package MethodApplication.MethodDemo4;

public class man {
    public void manBuy(){
        System.out.println("买了北京一套房");
    }
    public void sohappy(Method4 m){
        m.buy();
    }
    public void show(){
        /*sohappy(()->{
            this.manBuy();
        });*/
        //通过this的方法引用
        sohappy(this::manBuy);
    }
    public static void main(String[] args) {
        new man().show();
    }
}
